public class IsAlive implements Runnable{

    public void run(){
        for(int i = 0; i < 3; i++){
            System.out.println(Thread.currentThread().getName());
        }
    }

    public static void main(String[] args){

        IsAlive ia = new IsAlive();
        Thread t = new Thread(ia);

        System.out.println("--- before thread start ----> " + t.isAlive());
        t.start();
        System.out.println("---- after thread start ----> " + t.isAlive());

        System.out.println("Bye!");
    }

}